using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using Intelsi.Entity;

namespace Intelsi.DataAccess.Mapping
{
    public class BancoMap : EntityTypeConfiguration<Banco>
    {
        public BancoMap()
        {
            // Primary Key
            this.HasKey(t => t.IdBanco);

            // Properties
            this.Property(t => t.Nombre)
                .HasMaxLength(80);

            // Table & Column Mappings
            this.ToTable("Banco");
            this.Property(t => t.IdBanco).HasColumnName("IdBanco");
            this.Property(t => t.Nombre).HasColumnName("Nombre");
            this.Property(t => t.Tipo).HasColumnName("Tipo");
        }
    }
}
